package com.uzai.common.enums;

public enum MdActivityStatusEnum {
    NOT_START(0, "活动未开始"),
    START(1, "活动开始"),
    PAUSE(2, "活动暂停"),
    END(3, "活动结束");

    private Integer value;
    private String desc;

    MdActivityStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static MdActivityStatusEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (MdActivityStatusEnum type: MdActivityStatusEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
